<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Vue resultat</title>
</head>
<body>
<div>
	<div class="oneLine">
		<form action="/shoot/calendar"  method="post">
			<input type="submit" class="undo" value=""/>
		</form>
	</div>
	<div class="oneLine">
		Retour au calendrier
	</div>
</div>
<table>
	<c:forEach items="${resultList }" var="result">
		<tr>
			<td>
				<c:if test="${!result.person.guest}">${result.ranking} -</c:if>
			</td>
			<td>
				${result.rankingWithGuest} 
			</td>
			<td>
				${result.realValue} 
			</td>
			<td>
				${result.person.name} 
			</td>
			<td>
				${result.person.forName}
			</td>
			<td>
				${result.person.getLastHandicap().categorie}
			</td>
			<td>
			<fmt:formatNumber var="nbrShoot" type="number"  maxFractionDigits="2" minFractionDigits="2" value="${result.numberOfClayShooted/result.numberOfClayTotal*50}" />
				${nbrShoot}
			</td>
			<td>
				${result.person.getLastHandicap().previousHandicap}
			</td>
			<td>
				${result.evolution}
			</td>
			<td>
				${result.percentNewHandicap}
			</td>
			
		</tr>
	</c:forEach>
			
</table>
${bestTeamStrength }
<table>
	<c:forEach items="${teamLists }" var="team">
		<tr>
			<td>
				${team.ranking}
			</td>
			<td>
				${team.name} -${team.listPerson.size()} 
			</td>
			<td>
				${team.getTeamValue(bestTeamStrength)}-${team.getAverageTotal()}
			</td>
			<td>
				${team.getTotalResult() }
			</td>
			<td>
				${team.getAverageHandicap() }
			</td>
			<td>
				  ${team.rankingWithGuest}- ${team.getAverageHandicapWithGuest() }-${team.getAverageTotalWithGuest()}
			</td>
		</tr>
	</c:forEach>
	
</table>
</body>
</html>